package com.crm.controller;

import com.crm.entity.Task;
import com.crm.result.Result;
import com.crm.service.RuleService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
public class RuleController {
    @Autowired
    private RuleService ruleService;

    @PostMapping("/rule/pool")
    public Result timeTask(@RequestBody Task task){
        ruleService.timeTask(task);
        return Result.success();
    }

}
